package com.centronix.dao;

import java.util.Date;
import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.centronix.domain.ProductRelease;
@Repository
public interface ProductReleaseDAO extends JpaSpecificationExecutor<ProductRelease>, JpaRepository<ProductRelease, Integer>{
	
	@Query("select pr from ProductRelease pr inner join pr.employee emp where emp.empId = :empId and pr.releaseDate = :releaseDate ")
	public List<ProductRelease> findByEmployeeAndReleaseDate(@Param("empId") Integer empId, @Param("releaseDate") Date releaseDate);
	
}
